#!/usr/bin/env python
#    rsp_dipvel_aosoppa
#    ---------------
#    Molecule:         H2O
#    Wave Function:    MP2 (AO-SOPPA module)
#    Test Purpose:     Calculation spin-spin coupling constants
#                      using the AO-SOPPA module. 

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

# Energy
f.add(string = 'Final HF energy',
      rel_tolerance = 1.0e-9)
f.add(string = 'Total MP2   energy',
      rel_tolerance = 1.0e-9)

# Input
f.add(string = 'Nuclear spin-spin coupling constants',
      rel_tolerance = 1.0e-2)
f.add(string = 'Spin-spin couplings printed for atoms',
      rel_tolerance = 1.0e-2)

# Coupling Constants
f.add(from_string = 'Isotropic coupling',
      num_lines = 10,
      abs_tolerance = 1.01e-4)

test.run(['aosoppa.dal'], ['formaldehyde.mol'], f={'out': f})

sys.exit(test.return_code)
